﻿<go:ControlPageBase x:Class="SuperGo.Silverlight.InitiateGame"
    xmlns="http://schemas.microsoft.com/client/2007" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:go="clr-namespace:SuperGo.Silverlight"
    >

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="250" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="350" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Grid Grid.RowSpan="3" Grid.ColumnSpan="3" Background="Gray" Opacity=".7" />

        <go:GoPanel x:Name="_beginAGamePanel" Title="New Game" Grid.Row="1" Grid.Column="1" Width="250">
            <StackPanel>
                <TextBlock x:Name="_errorMessage" Visibility="Collapsed" Foreground="Red" />

                <TextBlock Text="Who do you want to play?" />
                <go:FriendsList x:Name="_friendsList" IsEnabled="{Binding IsEnabled}" />
                <TextBlock>What Size Board?</TextBlock>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <RadioButton x:Name="_boardSize9" IsEnabled="{Binding IsEnabled}" IsChecked="{Binding BoardSize9}" GroupName="BoardSize" Grid.Column="0" Content="9 X 9"></RadioButton>
                    <RadioButton x:Name="_boardSize13" IsEnabled="{Binding IsEnabled}" GroupName="BoardSize" Grid.Column="1" IsChecked="{Binding BoardSize13}" HorizontalAlignment="Center" Content="13 X 13"></RadioButton>
                    <RadioButton x:Name="_boardSize19" IsEnabled="{Binding IsEnabled}" GroupName="BoardSize" Grid.Column="2" IsChecked="{Binding BoardSize19}" HorizontalAlignment="Right" Content="19 X 19"></RadioButton>
                </Grid>

                <TextBlock>Who Plays Black?</TextBlock>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <RadioButton x:Name="_iPlayBlack" IsEnabled="{Binding IsEnabled}" IsChecked="{Binding IPlayBlack}" GroupName="WhoPlaysBlack" Grid.Column="0" Content="I Play Black"></RadioButton>
                    <RadioButton x:Name="_theyPlayBlack" IsEnabled="{Binding IsEnabled}" IsChecked="{Binding TheyPlayBlack}" GroupName="WhoPlaysBlack" HorizontalAlignment="Right" Grid.Column="1" Content="They Play Black"></RadioButton>
                </Grid>

                <TextBlock>What Is Black's Handicap?</TextBlock>
                <go:ComboBox x:Name="_handicap" />

                <TextBlock>What Komi?</TextBlock>
                <TextBox x:Name="_komi" Foreground="{Binding Foreground}" IsReadOnly="{Binding ReadOnly}" Opacity=".5" Text="{Binding Komi}" />
            </StackPanel>
            <go:ButtonPanel x:Name="_buttonPanel" VerticalAlignment="Bottom" Height="24">
                <Button x:Name="_withdraw" Content="Withdraw" />
                <Button x:Name="_accept" Content="Accept" />
                <Button x:Name="_reject" Content="Reject" />
                <Button x:Name="_counter" Content="Counter" />
                <Button x:Name="_sendRequest" Content="Send Request" />
                <Button x:Name="_cancel" Content="Cancel" />
            </go:ButtonPanel>
        </go:GoPanel>
    </Grid>
</go:ControlPageBase>
